interface IItemConf {
  sourceUrl: string
  formater: string
}

export class Service {
  public getItemConf(name: string): IItemConf {
    return localStorage.getItem(name) && JSON.parse(localStorage.getItem(name) || '')
  }

  public setItemConf(name: string, data: IItemConf) {
    localStorage.setItem(name, JSON.stringify(data))
  }
}

export const service = new Service()